package com.qf.service;

import com.qf.baseservice.IBaseService;
import com.qf.entity.Address;
import com.qf.entity.User;

import java.util.List;

/**
 * <p>
 *  地址服务类
 * </p>
 *
 * @author 刘亚康
 * @since 2020-03-26
 */
public interface IAddressService extends IBaseService<Address> {
    /**
     * 根据用户id获取地址列表
     * @param user
     * @return
     */
    List<Address> getAddressListByUserId(User user);

    /**
     * 添加用户地址
     * @param user
     * @param address
     * @return
     */
    int insertAdd(User user, Address address);

    /**
     * 修改用户地址
     * @param user
     * @param address
     * @return
     */
    int updateAddress(User user, Address address,Integer updateAfterStatusIsDefault);

    /**
     * 删除地址
     * @param addressId
     * @return
     */
    int deleteAddress(Integer addressId,User user);
}
